package com.net.oil.car.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.car.bean.CarBrandBean;
import com.net.oil.car.contract.SelectCarBrandContract;
import com.net.oil.car.model.SelectCarBrandModel;

import java.util.List;

/**
 * 作者：lch
 * 时间：2018/4/9 0009:下午 13:35
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class SelectCarBrandPresenter extends BasePresenter<SelectCarBrandContract.View> implements SelectCarBrandContract.Presenter {

    private SelectCarBrandContract.View view;
    private SelectCarBrandContract.Model model;

    public SelectCarBrandPresenter(SelectCarBrandContract.View view) {
        this.view = view;
        model = new SelectCarBrandModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getCarBrand() {
        model.getCarBrand();
    }

    @Override
    public void getCarBrandSuccess(List<CarBrandBean> carBrandBeans) {
        view.getCarBrandSuccess(carBrandBeans);
    }

    @Override
    public void getCarBrandFailed() {
        view.getCarBrandFailed();
    }
}
